package cn.pfz.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: 普发忠
 * @Date: 2021/10/09/15:39
 * 攻略 明细
 */
@Data
@TableName("strategy")
public class Strategy extends BaseDomain implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    public static final int ABROAD_ON = 0;//国内
    public static final int ABROAD_YES = 1;//国外
    
    public static final int STATE_NONPUBLIC = 0;//没有发布
    public static final int STATE_PUBLISH = 1;//已经发布
    
    private Long destId;   //关联目的地的id
    private String destName;  //关联目的地的名字
    
    private Long themeId; //关联主题id
    private String themeName;//关联主题名字
    
    private Long catalogId; //关联分类的ID
    private String catalogName;//关联分类的名字
    
    private String title;//标题
    private String subTitle; //副标题
    private String summary;//内容摘要
    private String coverUrl;//封面
    private Date createTime;//创建日期
    private Integer isabroad = ABROAD_ON;//是否国外
    private Integer viewnum;//点击数
    private Integer replynum;//攻略评论数
    private Integer favornum;//收藏数
    private Integer sharenum;//分享数
    private Integer thumbsupnum;//点赞数
    private Integer state = STATE_NONPUBLIC;//发布状态
    @TableField(exist = false)
    private StrategyContent content;
    
    public String getStateDisplay() {
        return state == STATE_NONPUBLIC ? "待发布" : "发布";
    }
}
